<?php

namespace app\controllers;

class TestController extends BaseController
{
	public function index($var1 = [], $var2 = [])
	{
		$data = array(
			'title' => 'Hello PHP Angular',
			'var1' => $var1,
			'var2' => $var2,
			'list'  => array(
				array('name' => 'name_1', 'email' => 'email_1@qq.com'),
				array('name' => 'name_2', 'email' => 'email_2@qq.com'),
				array('name' => 'name_3', 'email' => 'email_3@qq.com'),
				array('name' => 'name_4', 'email' => 'email_4@qq.com'),
				array('name' => 'name_5', 'email' => 'email_5@qq.com'),
			),
		);
		
		return \View::display("test", $data);
	}
	
	public function test()
	{
		var_dump(INF);
		
		$num = 0;
		try {
			echo 1/$num;
		} catch (\Exception $e) {
			echo $e->getMessage();
		}
	}
}
